Skip to content

fix(build): bound Cargo target cache generations - #2025

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/cargo-target-cache-gc
Aug 4, 2026
Merged

fix(build): bound Cargo target cache generations#2025
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/cargo-target-cache-gc

Conversation

@bobleer

@bobleer bobleer commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • identify Cargo units from fingerprint metadata and retain the latest generation plus recently invoked variants
  • prune stale fingerprint generations together with orphaned deps and build outputs
  • scope compiler-busy detection to the selected target profile locks
  • restore BITFUN_TARGET_GC_DRY_RUN behavior and document the 24-hour grace window

Root cause

The previous collector never removed fingerprint directories. Because deps artifacts were considered live whenever a matching fingerprint existed, historical deps generations accumulated indefinitely. The global cargo/rustc process check could also suppress collection whenever an unrelated worktree was compiling.

Validation

  • node --test scripts/cargo-target-gc.test.mjs scripts/desktop-tauri-build.test.mjs
  • pnpm run check:build-prereqs
  • cargo check -p bitfun-desktop
  • post-GC cargo check cache hit: 1.01 seconds
  • debug and release dry-runs converged to no stale paths

@bobleer
bobleer merged commit cf886ab into GCWing:main Aug 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant